<template>
  <configForm :configs="createForm" :server="arrearsTraceServer" :beforeSubmit="beforeSubmit" />
</template>

<script setup>
import { arrearsTraceServer } from '@/api/arrears'
import { ref } from 'vue'
import ConfigForm from '@/components/CRUD/ConfigForm.vue'
const props = defineProps({
  arrearsDataId: Number
})
const createForm = ref([
  {
    label: '跟进方式',
    key: 'method',
    type: 'radio',
    defaultValue: '电话',
    options: [
      { label: '电话', value: '电话' },
      { label: '微信', value: '微信' },
      { label: '系统', value: '系统' },
    ],
  },
  {
    label: '是否接听',
    key: 'is_pick_mobile',
    type: 'radio',
    required: true,
    defaultValue: true,
    options: [
      { label: '是', value: true },
      { label: '否', value: false },
    ],
  },
  {
    label: '备注',
    key: 'remark',
    type: 'input', // 使用文本域输入
    props: { placeholder: '请输入备注', type: 'textarea' },
  },
])
const beforeSubmit = (params) => {
  params.arrears_data_id = props.arrearsDataId
  return params
}
</script>
